Skip to content

[SYCL] Deprecate info::*::reference_count#22521

Merged
uditagarwal97 merged 5 commits into
intel:syclfrom
crystarm:deprecate-info-reference-count
Jul 12, 2026
Merged

[SYCL] Deprecate info::*::reference_count#22521
uditagarwal97 merged 5 commits into
intel:syclfrom
crystarm:deprecate-info-reference-count

Conversation

@crystarm

@crystarm crystarm commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #22504.

Summary

info::reference_count descriptors exist in five info namespaces (context, device, event, kernel, queue).

This PR deprecates all five descriptors and guards them behind __INTEL_PREVIEW_BREAKING_CHANGES.

Notes

Three e2e tests (Basic/kernel_info.cpp, Basic/info.cpp, Regression/dummy_event_info.cpp) still reference reference_count and will emit deprecation warnings. I guess they should be cleaned up in a follow-up.

@crystarm
crystarm requested a review from a team as a code owner July 2, 2026 11:53
@crystarm
crystarm requested a review from uditagarwal97 July 2, 2026 11:53
@crystarm
crystarm marked this pull request as draft July 2, 2026 11:57
@crystarm
crystarm marked this pull request as ready for review July 2, 2026 12:24
@uditagarwal97
uditagarwal97 requested a review from Copilot July 2, 2026 15:35

@uditagarwal97 uditagarwal97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR deprecates the legacy SYCL 1.2.1 info::*::reference_count descriptors (not part of SYCL 2020) across the context, device, event, kernel, and queue info namespaces, and gates their availability behind __INTEL_PREVIEW_BREAKING_CHANGES for future removal during an ABI-break window.

Changes:

  • Adds __SYCL_DEPRECATED annotations to info::{context,device,event,kernel,queue}::reference_count.
  • Wraps the corresponding explicit template instantiations and get_info specializations in #ifndef __INTEL_PREVIEW_BREAKING_CHANGES.
  • Ensures the public info descriptors themselves are also conditionally available under the same macro.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sycl/source/queue.cpp Gates queue::get_info<info::queue::reference_count>() explicit instantiation behind __INTEL_PREVIEW_BREAKING_CHANGES.
sycl/source/kernel.cpp Gates kernel::get_info_impl<info::kernel::reference_count>() explicit instantiation behind __INTEL_PREVIEW_BREAKING_CHANGES.
sycl/source/event.cpp Gates event::get_info<info::event::reference_count>() explicit instantiation behind __INTEL_PREVIEW_BREAKING_CHANGES.
sycl/source/device.cpp Gates device::get_info_impl<info::device::reference_count>() explicit instantiation behind __INTEL_PREVIEW_BREAKING_CHANGES.
sycl/source/context.cpp Gates context::get_info<info::context::reference_count>() explicit instantiation behind __INTEL_PREVIEW_BREAKING_CHANGES.
sycl/source/detail/queue_impl.cpp Gates the queue_impl reference_count query specialization behind __INTEL_PREVIEW_BREAKING_CHANGES.
sycl/source/detail/event_impl.cpp Gates the event_impl reference_count query specialization behind __INTEL_PREVIEW_BREAKING_CHANGES.
sycl/source/detail/context_impl.cpp Gates the context_impl reference_count query specialization behind __INTEL_PREVIEW_BREAKING_CHANGES.
sycl/include/sycl/info/queue.hpp Deprecates and gates info::queue::reference_count.
sycl/include/sycl/info/kernel.hpp Deprecates and gates info::kernel::reference_count.
sycl/include/sycl/info/event.hpp Deprecates and gates info::event::reference_count.
sycl/include/sycl/info/device.hpp Deprecates and gates info::device::reference_count.
sycl/include/sycl/info/context.hpp Deprecates and gates info::context::reference_count.

Comment on lines 68 to 71
ur_result_t result = UR_RESULT_SUCCESS;
getAdapter().call<UrApiKind::urQueueGetInfo>(
MQueue, UR_QUEUE_INFO_REFERENCE_COUNT, sizeof(result), &result, nullptr);
return result;
Comment on lines +42 to 46
struct __SYCL_DEPRECATED("info::kernel::reference_count is not part of "
"SYCL 2020") reference_count
: kernel_traits<UR_KERNEL_INFO_REFERENCE_COUNT> {
using return_type = uint32_t;
};
Comment on lines +40 to 44
struct __SYCL_DEPRECATED("info::event::reference_count is not part of "
"SYCL 2020") reference_count
: event_traits<UR_EVENT_INFO_REFERENCE_COUNT> {
using return_type = uint32_t;
};
@KornevNikita

Copy link
Copy Markdown
Contributor

@crystarm please fix pre-commit issues

@crystarm
crystarm marked this pull request as draft July 3, 2026 12:53

@KornevNikita KornevNikita left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @uditagarwal97 could you please take one more look

Comment thread sycl/include/sycl/info/context.hpp Outdated
Comment thread sycl/test-e2e/Basic/info.cpp
Comment thread sycl/test-e2e/DeprecatedFeatures/reference_count.cpp Outdated
@crystarm
crystarm marked this pull request as ready for review July 9, 2026 11:02
Comment thread sycl/test-e2e/DeprecatedFeatures/reference_count.cpp Outdated
@uditagarwal97

Copy link
Copy Markdown
Contributor

Hi @crystarm,

The PR is good to be merged but there's one thing blocking it.

This commit will be authored by 68424751+crystarm@users.noreply.github.com.

Please check out https://llvm.org/docs/DeveloperPolicy.html#email-addresses - you'd have to change your Github account setting to allow committing from your personal email address. We don't allow committing from anonymous email addresses (like from noreply.github.com). Just changing your Github account settings should suffice - you don't have update the commits to include your personal email.

@crystarm
crystarm force-pushed the deprecate-info-reference-count branch from a7a5aa4 to ee1ae4f Compare July 11, 2026 11:09
@crystarm

Copy link
Copy Markdown
Contributor Author

@uditagarwal97
Hi!!
I'd already started fixing it before I finished reading your message (sorry...). So I updated all the commits in this PR with my new email address, added a new UID with that address to my GPG2 key, and re-signed all the commits with the updated key. Force pushed.

I also disabled the "Keep my email addresses private" option in my GitHub settings.

@uditagarwal97

Copy link
Copy Markdown
Contributor

@uditagarwal97 Hi!! I'd already started fixing it before I finished reading your message (sorry...). So I updated all the commits in this PR with my new email address, added a new UID with that address to my GPG2 key, and re-signed all the commits with the updated key. Force pushed.

I also disabled the "Keep my email addresses private" option in my GitHub settings.

okay, no worries.

@uditagarwal97
uditagarwal97 merged commit 190878e into intel:sycl Jul 12, 2026
29 of 30 checks passed
@uditagarwal97

Copy link
Copy Markdown
Contributor

Thanks for working on this @crystarm 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove undocumented info::reference_count

4 participants